import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
// 导入网络请求
import network from "./network/network";
//导入store对象
import store from "./store/index";
//Provider组件是react-redux提供的一个自定义组件，该组件可以将store对象绑定到某一个DOM节点和其后代节点下，从而保证从绑定的节点开始，内容所有的节点都可以访问到store对象。 
import {Provider} from "react-redux"; 

//将网络请求进行全局绑定
Component.prototype.$datas = network;

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
